<?php
$profiler = system_db::getAdapter()->getProfiler();
if($profiler->getEnabled()) {
	echo '<div id="debug">';
	echo 'QTY: '.$profiler->getTotalNumQueries();
	if(!!($list = $profiler->getQueryProfiles())) {
		echo '<ul>';
		foreach($list AS $v) {
			echo '<li>'.$this->escape($v->getQuery()).'</li>';
		}
		echo '</ul>';
	}
	echo '</div>';
}
?>